/* 通用重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', '微软雅黑', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 头部通用样式 */
.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-title {
    font-size: 24px;
    color: #2c3e50;
}

.site-title a {
    color: #2c3e50;
    text-decoration: none;
}

.main-nav a {
    color: #555;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: #3498db;
}

/* 首页样式 */
.home-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-box {
    display: flex;
    gap: 8px;
}

#search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

#search-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.home-container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
}

.news-filter {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.news-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 15px;
}

.news-card-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.news-card-title a {
    color: #2c3e50;
    text-decoration: none;
}

.news-card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.news-card-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.home-footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

.home-footer a {
    color: #3498db;
    text-decoration: none;
}

/* 详情页样式 */
.detail-header {
    background-color: #2c3e50;
    color: #fff;
}

.detail-header .main-nav a {
    color: #ddd;
}

.detail-header .main-nav a:hover {
    color: #fff;
}

.detail-container {
    width: 90%;
    max-width: 1000px;
    margin: 30px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.news-detail h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-meta {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.news-meta .news-type {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 10px;
}

.news-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 25px;
}

.news-content {
    font-size: 16px;
    color: #444;
}

.news-content p {
    margin-bottom: 18px;
    text-indent: 2em;
}

/* 评论区样式 */
.news-comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.news-comments h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #2c3e50;
}

#comments-list {
    margin-bottom: 25px;
}

.comment-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 15px;
}

.comment-item .comment-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 10px;
}

#submit-comment {
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.back-home {
    margin-top: 30px;
}

.back-home a {
    color: #3498db;
    text-decoration: none;
    font-size: 16px;
}
.detail-footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}